Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test!: refactor testnode #2871

Merged
merged 15 commits into from
Dec 4, 2023
Merged

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Nov 26, 2023

Miscelaneous refactors to testnode while working on #2858 but doesn't actually close that issue. This PR adds more logging to help debug the second scenario alluded to in the original post.

@rootulp rootulp marked this pull request as ready for review November 26, 2023 00:38
Copy link
Contributor

coderabbitai bot commented Nov 26, 2023

Walkthrough

Walkthrough

The changes across various Go test files involve updating consensus parameters, adjusting maximum transaction and block sizes, and refining the configuration and initialization of test nodes. A new testnode package is introduced, and functions are renamed and updated to reflect new logic, particularly for setting up networks and nodes. Constants for memory sizes are added, and unnecessary code and imports are removed to streamline the testing environment.

Changes

File(s) Summary
app/test/max_total_blob_size_test.go
test/cmd/txsim/cli_test.go
x/mint/test/mint_test.go
Updated to use DefaultConsensusParams instead of DefaultParams, affecting consensus parameter configuration. Adjusted maximum transaction and block sizes.
test/util/testnode/app_options.go
test/util/testnode/config.go (removals)
Introduced testnode package and KVAppOptions type for managing application options. Removed KVAppOptions struct and related functions in subsequent changes.
test/util/testnode/config.go (additions and renames) Added constants for memory sizes. Renamed and updated functions to reflect new logic for default configurations and consensus parameters. Removed unnecessary imports.
test/util/testnode/full_node.go Updated logger initialization and removed unused imports and code related to genesis package.
test/util/testnode/network.go Added NewNetwork function and helper functions for port management, setting up a single validator network with RPC and gRPC configurations.
test/util/testnode/rpc_client.go Modified function signatures to include testing.TB parameter, added logging, and replaced cleanup functions.
test/util/testnode/full_node_test.go Removed unused constant kibibyte from the file.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

test/util/testnode/rpc_client.go Outdated Show resolved Hide resolved
test/util/testnode/network.go Outdated Show resolved Hide resolved
@rootulp rootulp self-assigned this Nov 26, 2023
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@celestia-bot celestia-bot requested a review from a team November 27, 2023 01:15
test/util/testnode/network.go Show resolved Hide resolved
test/util/testnode/network.go Outdated Show resolved Hide resolved
evan-forbes
evan-forbes previously approved these changes Nov 27, 2023
app/test/max_total_blob_size_test.go Show resolved Hide resolved
@rootulp rootulp changed the title test: refactor testnode test!: refactor testnode Nov 27, 2023
@evan-forbes evan-forbes added testing items that are strictly related to adding or extending test coverage warn:api breaking item will be break an API and require a major bump refactor optional label for items that are related to implementation work and do not change functionality labels Nov 28, 2023
@rootulp rootulp requested a review from staheri14 November 28, 2023 18:01
@celestia-bot celestia-bot requested a review from a team November 28, 2023 18:01
@rootulp rootulp requested a review from rach-id November 30, 2023 16:04
Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

@rootulp rootulp merged commit 30e907f into celestiaorg:main Dec 4, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor optional label for items that are related to implementation work and do not change functionality testing items that are strictly related to adding or extending test coverage warn:api breaking item will be break an API and require a major bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants